@import '../../style/themes/index.less';

@list-prefix-cls: ~'@{prefix}-list';
@item-prefix-cls: ~'@{prefix}-item';

.@{item-prefix-cls} {
  padding: 32px;
  position: relative;
  user-select: none;
  -webkit-user-select: none;
  font-size: 26px;
  background-color: #fff;
  box-sizing: border-box;
  display: flex;
  align-items: center;

  &-inner {
    display: flex;
    width: 100%;
    align-items: center;
  }

  &:not(:first-child):before {
    content: ' ';
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    height: 2px;
    border-top: 2px solid rgba(0, 0, 0, 0.1);
    color: rgba(0, 0, 0, 0.1);
    -webkit-transform-origin: 0 0;
    transform-origin: 0 0;
    -webkit-transform: scaleY(0.5);
    transform: scaleY(0.5);
    left: 32px;
    z-index: 2;
  }

  &-access {
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    color: inherit;
    transition: 0.24s;

    &:active {
      background-color: #ececec;
    }
  }

  &[class*='weui-item-arrow'] {
    .@{item-prefix-cls}-ft {
      padding-right: 44px;
      position: relative;

      &:after {
        content: ' ';
        width: 24px;
        height: 48px;
        -webkit-mask-position: 0 0;
        mask-position: 0 0;
        -webkit-mask-repeat: no-repeat;
        mask-repeat: no-repeat;
        -webkit-mask-size: 100%;
        mask-size: 100%;
        background-color: currentColor;
        color: rgba(0, 0, 0, 0.3);
        -webkit-mask-image: url(data:image/svg+xml,%3Csvg%20width%3D%2212%22%20height%3D%2224%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M2.454%206.58l1.06-1.06%205.78%205.779a.996.996%200%20010%201.413l-5.78%205.779-1.06-1.061%205.425-5.425-5.425-5.424z%22%20fill%3D%22%23B2B2B2%22%20fill-rule%3D%22evenodd%22%2F%3E%3C%2Fsvg%3E);
        mask-image: url(data:image/svg+xml,%3Csvg%20width%3D%2212%22%20height%3D%2224%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M2.454%206.58l1.06-1.06%205.78%205.779a.996.996%200%20010%201.413l-5.78%205.779-1.06-1.061%205.425-5.425-5.425-5.424z%22%20fill%3D%22%23B2B2B2%22%20fill-rule%3D%22evenodd%22%2F%3E%3C%2Fsvg%3E);
        position: absolute;
        top: 50%;
        right: 0;
        margin-top: -24px;
      }
    }
  }

  &-arrow-down&-access {
    .@{item-prefix-cls}-ft:after {
      transform: rotate(90deg);
    }
  }
  &-arrow-up&-access {
    .@{item-prefix-cls}-ft:after {
      transform: rotate(-90deg);
    }
  }

  &-hd,
  &-thumb {
    flex-shrink: 0;
    margin-right: 15px;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
  }

  &-hd {
    font-size: 28px;
  }

  &-bd {
    font-size: 28px;
    flex: 1;
    overflow: hidden;
  }

  &-ft {
    flex-shrink: 0;
    text-align: right;
    font-size: 26px;
    color: rgba(0, 0, 0, 0.5);
  }

  &-align-right {
    .@{item-prefix-cls}-bd {
      text-align: right;
    }
  }

  &-align-center {
    .@{item-prefix-cls}-bd {
      text-align: center;
    }
  }
}

.@{list-prefix-cls} {
  margin-top: 16px;
  background-color: #ffffff;
  line-height: 1.41176471;
  overflow: hidden;
  position: relative;
  outline: none;
  user-select: none;
  -webkit-user-select: none;

  &.title {
    .@{list-prefix-cls}-inner {
      margin-top: 16px;
    }
  }

  &:before {
    content: ' ';
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    height: 2px;
    border-top: 2px solid rgba(0, 0, 0, 0.1);
    color: rgba(0, 0, 0, 0.1);
    -webkit-transform-origin: 0 0;
    transform-origin: 0 0;
    -webkit-transform: scaleY(0.5);
    transform: scaleY(0.5);
    z-index: 2;
  }

  &:after {
    content: ' ';
    position: absolute;
    left: 0;
    bottom: 0;
    right: 0;
    height: 2px;
    border-bottom: 2px solid rgba(0, 0, 0, 0.1);
    color: rgba(0, 0, 0, 0.1);
    -webkit-transform-origin: 0 100%;
    transform-origin: 0 100%;
    -webkit-transform: scaleY(0.5);
    transform: scaleY(0.5);
    z-index: 2;
  }

  &-title {
    margin-top: 32px;
    margin-bottom: 6px;
    padding-left: 32px;
    padding-right: 32px;
    color: rgba(0, 0, 0, 0.5);
    font-size: 26px;
    line-height: 1.4;
    user-select: none;
    -webkit-user-select: none;
  }

  &:last-child:after {
    display: none;
  }
}
